package com.zhiyume.util;

import com.zhiyume.api.util.ApiClassifyEnum;

import java.util.HashMap;
import java.util.Map;

import static com.zhiyume.util.TypeConstants.PersonConstant.PERSON_ACTOR;
import static com.zhiyume.util.TypeConstants.PersonConstant.PERSON_DIRECTOR;
import static com.zhiyume.util.TypeConstants.PersonConstant.PERSON_WRITER;

public final class TypeConstants {
    // url分隔符
    public static final String URL_SPLIT = "@@@@";
    public static final String VIDEO_FLOOR = "VIDEO_FLOOR";
    public static final String IMAGE_LR_FLOOR="IMAGE_LR_FLOOR";
    public static final String IMAGE_BIG_FLOOR="IMAGE_BIG_FLOOR";
    public static final String IMAGE_FLOOR="IMAGE_FLOOR";
    public static final String SLIDER_FLOOR = "SLIDER_FLOOR";
    public static final String TOP_FLOOR = "TOP_FLOOR";

    public static final String STATUS_DRAFT = "STATUS_DRAFT"; // 草稿
    public static final String STATUS_CHECKPENDING = "STATUS_DRAFT"; // 待审核
    public static final String STATUS_PASS = "STATUS_PASS"; // 审核通过
    public static final String STATUS_PUBLISHED = "STATUS_PUBLISHED"; // 已发布
    public static final String STATUS_FAILED = "STATUS_FAILED"; // 审核未通过

    public static final String ACTIVITY_DRAFT = "ACTIVITY_DRAFT"; // 草稿
    public static final String ACTIVITY_CHECKPENDING = "ACTIVITY_CHECKPENDING"; // 待审核
    public static final String ACTIVITY_PASS = "ACTIVITY_PASS"; // 审核通过
    public static final String ACTIVITY_REFUSE = "ACTIVITY_REFUSE"; // 审核未通过
    public static final String ACTIVITY_PUBLISH = "ACTIVITY_PUBLISH"; // 发布
    public static final String ACTIVITY_CLOSE = "ACTIVITY_CLOSE"; // 结束
    // 已发布资讯操作类型
    public static final String OPT_TO_TOP = "toTop"; // 置顶
    public static final String OPT_SLIDER = "slider"; // 轮播
    public static final String OPT_UNDER = "under"; // 下架
    public static final String OPT_INTRO = "intro"; // 推荐
    public static final String OPT_REVOKE = "revoke"; // 撤回重审

    public static final String COMMON_VALID = "0";
    public static final String COMMON_INVALID = "1";




    // 十二星座
    public static final String[] constellationArr = {"水瓶座","双鱼座","白羊座","金牛座","双子座","巨蟹座","狮子座","处女座","天秤座","天蝎座","射手座","摩羯座"};
    // App首页导航栏目
    //add by wangxq 20180306 跟 ApiClassifyEnum相关
    public static final String[] navArr = {
            ApiClassifyEnum.TEL.getName(),
            ApiClassifyEnum.MOVIE.getName(),
            ApiClassifyEnum.NET.getName(),
            ApiClassifyEnum.ACTOR.getName(),
            ApiClassifyEnum.VARIETY.getName(),
            ApiClassifyEnum.FASHION.getName(),
            ApiClassifyEnum.MUSIC.getName()
    };
    // 楼层
    //public static final String[] floorArr = {"热点专区","图文专区","视频专区"};
    public static final Map<String,String> floorMap = new HashMap<String,String>(){{
        put(VIDEO_FLOOR,"10");
        put("10","视频专区");

        put(IMAGE_FLOOR,"30");
        put("30","图文专区");

        put(IMAGE_BIG_FLOOR,"12");
        put("12","大图文专区");

        put(IMAGE_LR_FLOOR,"13");
        put("13","左右图文专区");

        put(SLIDER_FLOOR,"60");
        put("60","轮播专区");

        put(TOP_FLOOR,"11");
    }};

    public static final Map<String,String> floorValueMap = new HashMap<String,String>(){{
        put("10","视频专区");

        put("30","图文专区");

        put("12","大图文专区");

        put("13","左右图文专区");

        put("60","轮播专区");

        put("11","置顶");
    }};

    // 资讯状态
    public static final String[] informationStatusArr = {"草稿","待审核","审核通过","已发布","审核未通过"};
    public static final Map statusMap = new HashMap(){
        {
            put(STATUS_DRAFT,"0");
            put("0","草稿");

            put(STATUS_CHECKPENDING,"1");
            put("1","待审核");

            put(STATUS_PASS,"2");
            put("2","审核通过");

            put(STATUS_PUBLISHED,"3");
            put("3","已发布");

            put(STATUS_FAILED,"4");
            put("4","审核未通过");

        }
    };

    // 剧库类别
    public static final String[] dramaTypeArr = {"爱情","悬疑","古装","犯罪","战争","动作","恐怖","科幻","家庭"};

    public static class PersonConstant {
        public static final int PERSON_ACTOR = 1; // 演员
        public static final int PERSON_WRITER = 2; // 编剧
        public static final int PERSON_DIRECTOR = 3; // 导演

        public static final String DefaultRepWorks="暂无";
    }



    public static final Map carrerMap = new HashMap(){
        {
            put(PERSON_ACTOR,1);
            put(1,"演员");

            put(PERSON_WRITER,2);
            put(2,"编剧");

            put(PERSON_DIRECTOR,3);
            put(3,"导演");
        }
    };


    // 资讯状态
    public static final Map activityStatusMap = new HashMap(){
        {
            put(ACTIVITY_DRAFT,"0");
            put("0","草稿");

            put(ACTIVITY_CHECKPENDING,"1");
            put("1","待审核");

            put(ACTIVITY_PASS,"2");
            put("2","审核通过");

            put(ACTIVITY_REFUSE,"3");
            put("3","未通过");

            put(ACTIVITY_PUBLISH,"4");
            put("4","发布");

            put(ACTIVITY_CLOSE,"5");
            put("5","发布");

        }
    };


    public static final String TOKEN_API_KEY = "ZHIYUTOKEN";
    public static final String REDIS_USER_KEY = "ZHIYUUSER_";
    public static final String REDIS_INFORMATION_KEY = "ZHIYUINFO_";

    public static final String REDIS_ACTIVITY_KEY = "ZHIYUACTIVITY_";

    public static class InformationConstants{
        public static final Long MIN_READ = 2000L;

    }

    public static class HomePageConstants{
        public static final int HOME_VIDEO_NUM = 4;
        public static final int VIDEO_FLAG = 1;
        public static final int RECOMMEND_TYPE = 99;
    }

    public static class AppConstants{
        public static final int IF_INTRO = 0;
        public static final String IF_DRAMA_SHOW = "0";
        public static final int IF_INFO_SHOW = 0;
    }


    public static class CmsResource {
        public static final String INFOR_TYPE = "01";
        public static final String DRAMA_TYPE = "02";
        public static final String ACTOR_TYPE = "03";
        public static final Integer HOME_PAGE_TYPE = 99;
    }

    public static class StyleConstants {
        //style
        public static String img_style = "style/img_w230_h138"; // 三图
        public static String video_style = "style/img_w320_h192"; // 左文字，右图
        public static String slider_style = "style/img_w750_h450"; // 上文字，下图

        public static String imgStatus = "30";
    }


    public static class WXConstants {
        public static String WX_APPID = "wxbfd8f589da5109f8";
        //微信公众号至娱么
        public static String WX_APPSECRET = "d5ba15c85bc942f1c4d8d1770e55a829";
        //微信公众号至娱么
        public static String WX_TOKEN_KEY = "WX_TOKEN_KEY";
        public static String WX_TICKET_KEY = "WX_TICKET_KEY";
        public static final String WEIXIN_TOKEN = "WEIXINZHIYUTOKEN";
    }
}
